VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
END
Attribute VB_Name = "ComboBoxEx"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Attribute VB_Ext_KEY = "SavedWithClassBuilder" ,"Yes"
Attribute VB_Ext_KEY = "Top_Level" ,"Yes"
Attribute VB_Ext_KEY = "Member0" ,"ComboItems"
Option Explicit
'----ComboEx Declare---------------------------------
Private mlParentHwnd As Long           'UserControl hWnd
Private mhImageList As Long            'image list handle
Public mComboItems As ComboItems       'collection of combo items

Private miNewIndex As Integer          'last added item

Private Const WM_CTLCOLOREDIT = &H133
Private Const WM_SETFONT = &H30

Private Const CBEX_DEF_HEIGHT = 150

Private NewComboFont As Long
Private cmbFontBold As Boolean
Private cmbFontItalic As Boolean
Private cmbFontName As String
Private cmbFontHeight As Integer
Private cmbCustomize As Boolean
Private cmbFontUnderlined As Boolean
 
Private Const SYSTEM_FONT& = 13
Private LF As LOGFONT
Public Enum cbIconState
  cbNormal = 0
  cbDisabled = 1
End Enum

Private Type FONTSTRUC
    lStructSize As Long
    hwnd As Long
    hdc As Long
    lpLogFont As Long
    iPointSize As Long
    flags As Long
    rgbColors As Long
    lCustData As Long
    lpfnHook As Long
    lpTemplateName As String
    hInstance As Long
    lpszStyle As String
    nFontType As Integer
    MISSING_ALIGNMENT As Integer
    nSizeMin As Long
    nSizeMax As Long
End Type

Private Type LOGFONT
    lfHeight As Long
    lfWidth As Long
    lfEscapement As Long
    lfOrientation As Long
    lfWeight As Long
    lfItalic As Byte
    lfUnderline As Byte
    lfStrikeOut As Byte
    lfCharSet As Byte
    lfOutPrecision As Byte
    lfClipPrecision As Byte
    lfQuality As Byte
    lfPitchAndFamily As Byte
    lffacename As String * 32
   'lfFaceName(LF_FACESIZE) As Byte
End Type

Private Const GMEM_MOVEABLE = &H2
Private Const GMEM_ZEROINIT = &H40
Private Const GHND = (GMEM_MOVEABLE Or GMEM_ZEROINIT)
Private Declare Function ReleaseDC Lib "user32" (ByVal hwnd As Long, ByVal hdc As Long) As Long
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Declare Function GlobalAlloc Lib "kernel32" (ByVal wFlags As Long, ByVal dwBytes As Long) As Long
Private Declare Function GlobalFree Lib "kernel32" (ByVal hMem As Long) As Long
Private Declare Function GlobalLock Lib "kernel32" (ByVal hMem As Long) As Long
Private Declare Function GlobalUnlock Lib "kernel32" (ByVal hMem As Long) As Long
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (hpvDest As Any, hpvSource As Any, ByVal cbCopy As Long)
Private Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function SetBkColor Lib "gdi32" (ByVal hdc As Long, ByVal crColor As Long) As Long
Private Declare Function SetTextColor Lib "gdi32" (ByVal hdc As Long, ByVal crColor As Long) As Long
Private Declare Function GetClientRect Lib "user32" (ByVal hwnd As Long, lpRect As RECT) As Long
Private Declare Function SendMessageByString& Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As String)
Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Declare Function SendMessageByLong Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Long) As Long
Private Declare Function ExtractIconEx Lib "shell32.dll" Alias "ExtractIconExA" (ByVal lpszFile As String, ByVal nIconIndex As Long, phiconLarge As Long, phiconSmall As Long, ByVal nIcons As Long) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Declare Function MoveWindow Lib "user32" (ByVal hwnd As Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal bRepaint As Long) As Long
Private Declare Function IsWindowVisible Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function CreateWindowEX Lib "user32" Alias "CreateWindowExA" (ByVal dwExStyle As Long, ByVal lpClassName As String, ByVal lpWindowName As String, ByVal dwStyle As Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hWndParent As Long, ByVal hMenu As Long, ByVal hInstance As Long, lpParam As Any) As Long
Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Private Declare Function DestroyWindow Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function SelectObject Lib "gdi32" (ByVal hdc As Long, ByVal hObject As Long) As Long
Private Declare Function CreateFontIndirect Lib "gdi32" Alias "CreateFontIndirectA" (lpLogFont As LOGFONT) As Long
Private Declare Function DeleteObject Lib "gdi32" (ByVal hObject As Long) As Long
Private Declare Function SetBkMode Lib "gdi32" (ByVal hdc As Long, ByVal nBkMode As Long) As Long
Private Declare Function GetTextFace Lib "gdi32" Alias "GetTextFaceA" (ByVal hdc As Long, ByVal nCount As Long, ByVal lpFacename As String) As Long
Private Declare Function GetTextMetrics Lib "gdi32" Alias "GetTextMetricsA" (ByVal hdc As Long, lpMetrics As TEXTMETRIC) As Long
Private Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String) As Long
Private Declare Function UpdateWindow Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function GetStockObject Lib "gdi32" (ByVal nIndex As Long) As Long
Private Declare Function GetWindowRect Lib "user32" (ByVal hwnd As Long, lpRect As RECT) As Long
Private Declare Function InitCommonControlsEx Lib "comctl32.dll" (iccex As tagInitCommonControlsEx) As Boolean
Private Declare Function SendStringMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As String) As Long
Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long


Private Type TEXTMETRIC
        tmHeight As Long
        tmAscent As Long
        tmDescent As Long
        tmInternalLeading As Long
        tmExternalLeading As Long
        tmAveCharWidth As Long
        tmMaxCharWidth As Long
        tmWeight As Long
        tmOverhang As Long
        tmDigitizedAspectX As Long
        tmDigitizedAspectY As Long
        tmFirstChar As Byte
        tmLastChar As Byte
        tmDefaultChar As Byte
        tmBreakChar As Byte
        tmItalic As Byte
        tmUnderlined As Byte
        tmStruckOut As Byte
        tmPitchAndFamily As Byte
        tmCharSet As Byte
End Type

 
Private Type RECT
      Left As Long
      Top As Long
      Right As Long
      Bottom As Long
End Type

Private Type tagInitCommonControlsEx
    lngSize As Long
    lngICC As Long
End Type

Private Const CF_BITMAP = 2
Private Const SWP_NOACTIVATE = &H10
 
Private Const CB_SETCURSEL = &H14E
Private Const CB_GETCOUNT = &H146
Private Const CB_GETCURSEL = &H147
Private Const CB_GETEDITSEL = &H140
Private Const CB_GETLBTEXT = &H148
Private Const CB_GETLBTEXTLEN = &H149
Private Const CB_SELECTSTRING = &H14D
Private Const CB_FINDSTRING = &H14C
Private Const CB_FINDSTRINGEXACT = &H158
Private Const CB_SETDROPPEDWIDTH = &H160
Private Const CB_SETITEMHEIGHT = &H153
Private Const CB_RESETCONTENT = &H14B
 

Private cbItems As COMBOBOXEXITEMW
'window stiles
Private Const WS_VISIBLE = &H10000000
Private Const WS_CHILD = &H40000000
Private Const WS_TABSTOP = &H10000
Private Const WS_GROUP = &H20000
Private Const WS_MAXIMIZE = &H1000000
Private Const WS_OVERLAPPED = &H0&

Private Const WM_USER = &H400
Private Const GWL_HWNDPARENT = (-8)
Private Const GWL_STYLE = (-16)
 
Private ComboExhWnd As Long

Const HWND_TOPMOST = -1
Const SW_HIDE = 0
Const SW_SHOWNORMAL = 1
 
Const SWP_NOSIZE = &H1
Const SWP_NOMOVE = &H2
Const SWP_NOREDRAW = &H8
Const SWP_SHOWWINDOW = &H40

Private Const ICC_USEREX_CLASSES = &H200

Private Const WC_COMBOBOXEXW = "ComboBoxEx32"
Private Const WC_COMBOBOXEXA = "ComboBoxEx32"
 
#If UNICODE Then
Private Const WC_COMBOBOXEX = WC_COMBOBOXEXW
#Else
Private Const WC_COMBOBOXEX = WC_COMBOBOXEXA
#End If

Private Const CBS_DROPDOWN = &H2&
Private Const CBS_DROPDOWNLIST = &H3&
Private Const CBS_HASSTRINGS = &H200&
Private Const CBS_DISABLENOSCROLL = &H800&
Private Const CBS_NOINTEGRALHEIGHT = &H400&
Private Const CBS_OWNERDRAWFIXED = &H10&
Private Const CBS_OWNERDRAWVARIABLE = &H20&
Private Const CBS_SIMPLE = &H1&
Private Const CBS_SORT = &H100&
Private Const CB_SETEDITSEL = &H142
 
Private Const CBEIF_TEXT = &H1
Private Const CBEIF_IMAGE = &H2
Private Const CBEIF_SELECTEDIMAGE = &H4
Private Const CBEIF_OVERLAY = &H8
Private Const CBEIF_INDENT = &H10
Private Const CBEIF_LPARAM = &H20
Private Const CBEIF_DI_SETITEM = &H10000000
Private Const H_MAX As Long = &HFFFF + 1
Private Const CBEN_FIRST = (H_MAX - 800&)
Private Const CBEN_LAST = (H_MAX - 830&)
Private Const CBEN_GETDISPINFO = (CBEN_FIRST - 0)
Private Const CBEN_INSERTITEM = (CBEN_FIRST - 1)
Private Const CBEN_DELETEITEM = (CBEN_FIRST - 2)
Private Const CBEN_BEGINEDIT = (CBEN_FIRST - 4)
Private Const CBEN_ENDEDITA = (CBEN_FIRST - 5)
Private Const CBEN_ENDEDITW = (CBEN_FIRST - 6)
Private Const CBN_EDITCHANGE = 5
Private Const CBN_EDITUPDATE = 6
Private Const CBN_SELCHANGE = 1
Private Const CB_DELETESTRING = &H144
Private Const CBEM_INSERTITEMA = (WM_USER + 1)
Private Const CBEM_SETIMAGELIST = (WM_USER + 2)
Private Const CBEM_GETIMAGELIST = (WM_USER + 3)
Private Const CBEM_GETITEMA = (WM_USER + 4)
Private Const CBEM_SETITEMA = (WM_USER + 5)
Private Const CBEM_DELETEITEM = CB_DELETESTRING
Private Const CBEM_GETCOMBOCONTROL = (WM_USER + 6)
Private Const CBEM_GETEDITCONTROL = (WM_USER + 7)
Private Const CBEM_SETEXSTYLE = (WM_USER + 8)
Private Const CBEM_GETEXSTYLE = (WM_USER + 9)
Private Const CBEM_HASEDITCHANGED = (WM_USER + 10)
Private Const CBEM_INSERTITEMW = (WM_USER + 11)
Private Const CBEM_SETITEMW = (WM_USER + 12)
Private Const CBEM_GETITEMW = (WM_USER + 13)
Private Const CBN_SELENDOK = 9


Private Type COMBOBOXEXITEMW
    mask As Long
    iItem As Long
    pszText As String
    cchTextMax  As Long
    iImage As Long
    iSelectedImage As Long
    iOverlay As Long
    iIndent As Long
    lParam As Long
End Type


#If UNICODE Then
   Private Const CBEM_INSERTITEM = CBEM_INSERTITEMW
   Private Const CBEM_SETITEM = CBEM_SETITEMW
   Private Const CBEM_GETITEM = CBEM_GETITEMW
#Else
   Private Const CBEM_INSERTITEM = CBEM_INSERTITEMA
   Private Const CBEM_SETITEM = CBEM_SETITEMA
   Private Const CBEM_GETITEM = CBEM_GETITEMA
#End If

Private Const CBES_EX_NOEDITIMAGE = &H1
Private Const CBES_EX_NOEDITIMAGEINDENT = &H2
Private Const CBES_EX_PATHWORDBREAKPROC = &H4

Private Const TRANSPARENT = 1


Public Property Get ComboItems() As ComboItems
    Set ComboItems = mComboItems
End Property


Public Property Set ComboItems(vData As ComboItems)
    Set mComboItems = vData
End Property



Public Property Let ImageList(ByVal vData As Long)
    mhImageList = vData
    
   'Set the Imagelist for the ComboBox
   Call SendMessage(ComboExhWnd, CBEM_SETIMAGELIST, 0, ByVal mhImageList)

End Property


Public Property Get ImageList() As Long
    ImageList = mhImageList
End Property




Public Property Let ParentHwnd(ByVal vData As Long)
    mlParentHwnd = vData
End Property


Public Function GetComboHwnd() As Long
   GetComboHwnd = ComboExhWnd
End Function

Public Property Get ParentHwnd() As Long
    ParentHwnd = mlParentHwnd
End Property





Public Sub Clear()
   Dim i As Integer, Total%
   
   Total = ListCount
   
   For i = 0 To Total - 2
       Call SendMessage(ComboExhWnd, CBEM_DELETEITEM, 0, 0)
   Next
   
   cbItems.mask = 0&
   cbItems.pszText = ""
   cbItems.cchTextMax = 0
   cbItems.iIndent = 0
   cbItems.iImage = -1
   cbItems.iSelectedImage = -1
   cbItems.iItem = -1
   cbItems.iOverlay = -1
   
   For i = 1 To mComboItems.Count
       mComboItems.Remove 1
   Next
    
   Call SendMessage(ComboExhWnd, CBEM_INSERTITEM, -1, cbItems)
   Call SendMessage(ComboExhWnd, CBEM_DELETEITEM, 0, 0)
   
   SetIndex 0
End Sub

Public Sub RefreshItem(Index As Integer, ByVal NewText As String, _
   ByVal ImgIndex As Integer, _
   ByVal Indent As Integer)

   cbItems.mask = CBEIF_TEXT Or CBEIF_INDENT Or CBEIF_IMAGE Or _
      CBEIF_LPARAM Or CBEIF_SELECTEDIMAGE Or CBEIF_OVERLAY
   cbItems.pszText = NewText
   cbItems.cchTextMax = Len(NewText)
   cbItems.iIndent = Indent
   cbItems.iImage = ImgIndex
   cbItems.iSelectedImage = ImgIndex
   cbItems.iItem = Index
   cbItems.iOverlay = ImgIndex

   Call SendMessage(ComboExhWnd, CBEM_SETITEM, Index, cbItems)
End Sub

Public Sub RemoveItem(ByVal Item As Integer)
   Call SendMessage(ComboExhWnd, CBEM_DELETEITEM, Item, 0)
   
   mComboItems.Remove Item + 1
   SetIndex 0
End Sub
Public Sub Destroy()
   On Error Resume Next
   
   Call DestroyWindow(ComboExhWnd)
End Sub

Public Function GetDropDownHwnd() As Long
   GetDropDownHwnd = SendMessage(ComboExhWnd, CBEM_GETCOMBOCONTROL, 0, 0)
End Function
 
Public Function GetEditString() As String
   Dim EditHwnd As Long
   Dim ComboString As String * 255, lResult As Long
   
   'Gets the Text in the Edit portion of the ComboBox
   EditHwnd = SendMessage(ComboExhWnd, CBEM_GETEDITCONTROL, 0, 0)
   lResult = GetWindowText(EditHwnd, ComboString, Len(ComboString))
   GetEditString = Left(ComboString, lResult)
End Function

Public Function GetEdithWnd() As Long
   GetEdithWnd = SendMessage(ComboExhWnd, CBEM_GETEDITCONTROL, 0, 0)
End Function
Public Function ListCount() As Integer
   ListCount = SendMessage(GetComboHwnd, CB_GETCOUNT, 0, 0)
End Function

Public Sub SetEditString(EditString As String)
   Dim EditHwnd As Long
   Dim lResult As Long
   'Sets the Text in the Edit portion of the ComboBox
   'Only if it's editable
   EditHwnd = SendMessage(ComboExhWnd, CBEM_GETEDITCONTROL, 0, 0)
   lResult = SetWindowText(EditHwnd, ByVal EditString)
   Call UpdateWindow(EditHwnd)

End Sub
Public Function ResizeCombo(NewWidth As Integer) As Long
   Dim rc As RECT, FormRect As RECT
    
   Call GetWindowRect(ComboExhWnd, rc)
    
   Call MoveWindow(ComboExhWnd, 0&, 0&, _
      CLng(NewWidth / Screen.TwipsPerPixelX), CLng(rc.Bottom - rc.Top), True)
      
   ResizeCombo = CLng(rc.Bottom - rc.Top) * Screen.TwipsPerPixelY
End Function


Public Sub SetDropWidth(NewWidth As Integer)
Call SendMessage(GetDropDownHwnd, CB_SETDROPPEDWIDTH, NewWidth * Screen.TwipsPerPixelX, 0&)

End Sub

Public Sub SetIndex(Index As Integer)
   Dim CurSel As Long
    
   CurSel = SendMessage(ComboExhWnd, CB_SETCURSEL, Index, 0)
End Sub
Public Sub SetItemHeight(ItemHeight As Integer)
 
'Set the New Item Height of drop down
Call SendMessageByLong(GetDropDownHwnd, CB_SETITEMHEIGHT, 0, ByVal (ItemHeight And &HFFFF))
 
'Update the Window
Call UpdateWindow(GetDropDownHwnd)

End Sub

Private Sub Class_Initialize()
Dim iccex As tagInitCommonControlsEx
    With iccex
        .lngSize = LenB(iccex)
        .lngICC = ICC_USEREX_CLASSES
    End With
    
    Call InitCommonControlsEx(iccex)
 
   ComboExhWnd = 0
   
   Set mComboItems = New ComboItems
End Sub
 
Public Function Create(iCmbStyle As Integer) As Boolean
   Dim lWidth&, lHeight&, rc As RECT
   Dim lStyle&
   
   Call GetWindowRect(mlParentHwnd, rc)
   
   lWidth = rc.Right - rc.Left
   lHeight = CBEX_DEF_HEIGHT
   
   Select Case iCmbStyle
      Case 1   'simple
         lStyle = WS_CHILD Or WS_VISIBLE Or ws_BORDER Or CBS_SIMPLE Or WS_TABSTOP
      Case 2  'dropdown list
         lStyle = WS_CHILD Or WS_VISIBLE Or ws_BORDER Or CBS_DROPDOWNLIST Or WS_TABSTOP
      Case Else 'dropdown combo
         lStyle = WS_CHILD Or WS_VISIBLE Or ws_BORDER Or CBS_DROPDOWN Or WS_TABSTOP
   End Select
   
    ComboExhWnd = CreateWindowEX(0, WC_COMBOBOXEX, "", _
            lStyle, _
            0, 0, lWidth, lHeight, _
            mlParentHwnd, 0&, App.hInstance, 0&)
   
   'Set the parent to receive the messages
   Call SetParent(ComboExhWnd, mlParentHwnd)
   
   Call MoveWindow(ComboExhWnd, 0, 0, CLng(lWidth), CLng(lHeight), True)
   
   If cmbCustomize = True Then SetComboFont
   
   Call ShowWindow(ComboExhWnd, SW_SHOWNORMAL)
   
End Function


Public Sub Additems(ByVal CmbText As String, _
   ByVal ImgIndex As Integer, _
   ByVal Indent As Integer, ByVal Index As Integer)
   Dim cmbItem As ComboItem
   Dim lNewIndex&
   
   ImgIndex = ImgIndex - 1
   
   cbItems.mask = CBEIF_TEXT Or CBEIF_INDENT Or CBEIF_IMAGE Or _
      CBEIF_LPARAM Or CBEIF_SELECTEDIMAGE Or CBEIF_OVERLAY
   cbItems.pszText = CmbText
   cbItems.cchTextMax = Len(CmbText)
   cbItems.iIndent = Indent
   cbItems.iImage = ImgIndex
   cbItems.iSelectedImage = ImgIndex
   cbItems.iItem = Index
   cbItems.iOverlay = ImgIndex
   
   lNewIndex = SendMessage(ComboExhWnd, CBEM_INSERTITEM, 0, cbItems)
   
   If Index = -1 Then
      Set cmbItem = mComboItems.Add("C" & Trim$(Index))
      cmbItem.Image = ImgIndex
      cmbItem.Indent = Indent
   Else
      Set cmbItem = mComboItems.Item(Index)
   End If
   
   NewIndex = CInt(lNewIndex)
   
   cmbItem.Text = CmbText
 
End Sub

Public Function GetSelectedItem() As Integer
   On Error Resume Next
   
   GetSelectedItem = SendMessage(ComboExhWnd, CB_GETCURSEL, 0, 0)
   
End Function

Private Sub Class_Terminate()
  Set mComboItems = Nothing
   On Error Resume Next
   
   Set mComboItems = Nothing

   If ComboExhWnd <> 0 Then
      Call DestroyWindow(ComboExhWnd)
   End If
   
   Dim dl As Long
   
   If NewComboFont <> 0 Then
      dl = DeleteObject(NewComboFont)
   End If
End Sub
Public Sub SetComboFont()
 
    Dim cbDC As Long
 
    cbDC = GetDC(GetDropDownHwnd)
  
    Dim CurrentComboFont As Long
    
    Dim dl As Long
 
    Dim mFlags As Long
     
    CurrentComboFont = SelectObject(cbDC, GetStockObject(SYSTEM_FONT))
     
    dl = SetBkMode(cbDC, TRANSPARENT)
    
    LF.lffacename = cmbFontName & Chr$(0)
    LF.lfHeight = cmbFontHeight
    LF.lfUnderline = cmbFontUnderlined
    LF.lfItalic = cmbFontItalic
    
    If cmbFontBold = True Then
    LF.lfWeight = 600
    Else
    LF.lfWeight = 300
    End If
  
    NewComboFont = CreateFontIndirect(LF)
    dl = SelectObject(cbDC, NewComboFont)
      
    'Set the New Font to drop down
    Call SendMessage(GetDropDownHwnd, WM_SETFONT, NewComboFont, 1)
    
    Dim EditHwnd As Long
    EditHwnd = SendMessage(ComboExhWnd, CBEM_GETEDITCONTROL, 0, 0)
    
    'Set the New Font to the Edit window
    Call SendMessage(EditHwnd, WM_SETFONT, NewComboFont, 1)
       
    NewComboFont = SelectObject(cbDC, CurrentComboFont)
    'Restore original font
    dl = SelectObject(cbDC, CurrentComboFont)
    
    'NewComboFont is deleted in terminate Event
     
End Sub
Public Property Let FontBold(ByVal vNewValue As Boolean)
   cmbFontBold = vNewValue
   cmbCustomize = True
End Property
Public Property Let FontItalic(ByVal vNewValue As Boolean)
cmbFontItalic = vNewValue
cmbCustomize = True
End Property
Public Property Let FontName(ByVal vNewValue As String)
cmbFontName = vNewValue
cmbCustomize = True
End Property
Public Property Let FontHeight(ByVal vNewValue As Integer)
cmbFontHeight = vNewValue
cmbCustomize = True
End Property
Public Property Let FontUnderlined(ByVal vNewValue As Boolean)
cmbFontUnderlined = vNewValue
cmbCustomize = True
End Property
 

Public Property Get NewIndex() As Integer
   NewIndex = miNewIndex
End Property

Public Property Let NewIndex(ByVal vNewValue As Integer)
   miNewIndex = vNewValue
End Property
